package com.yuke.cloud.service.api.opc.service;

import com.yuke.cloud.common.security.feign.OAuth2FeignAutoConfiguration;
import com.yuke.cloud.common.util.wrapper.Wrapper;
import com.yuke.cloud.service.api.opc.dto.UploadFile;
import com.yuke.cloud.service.api.opc.service.hystrix.OpcFileFeignApiHystrix;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "yuke-cloud-service-opc", configuration = OAuth2FeignAutoConfiguration.class,
        fallback = OpcFileFeignApiHystrix.class, path = "${yuke.feign-path-opc}")
public interface OpcFileFeignApi {

    @PostMapping("/opc/api/image")
    @ApiOperation(httpMethod = "POST", value = "删除")
    Wrapper<Integer> fileDelete(@ApiParam(name = "file", value = "图片") @RequestBody List<UploadFile> uploadFiles);

    @PostMapping("/opc/api/images")
    @ApiOperation(httpMethod = "POST", value = "删除")
    Wrapper<Integer> filesDelete(@ApiParam(name = "file", value = "图片") @RequestBody UploadFile uploadFile);

//    @PostMapping("/api/opc/uploadExcelFiles")
//    @ApiOperation(httpMethod = "GET", value = "上传")
//    String uploadExcelFiles(@RequestParam("inputStream")InputStream inputStream, @RequestParam("fileName") String fileName, @RequestParam("ext") String ext);
}
